<div class="middle surface-shaded">
  <div class="middle-content">
    <div class="container-fluid">
      <div class="row">
        <div class="col-md-10">
          <breadcrumbs breadcrumbs="breadcrumbs"></breadcrumbs>
          <div class="mar-top-xl">
            <h1>Edit Config Map {{configMap.metadata.name}}</h1>
            <div class="help-block">
              Config maps hold key-value pairs that can be used in pods to read application
              configuration.
            </div>
            <div class="mar-top-xl">
              <div ng-if="!loaded">Loading...</div>
              <form ng-if="loaded" name="forms.editConfigMapForm">
                <div ng-if="resourceChanged && !resourceDeleted && !updatingNow" class="alert alert-warning">
                  <span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
                  <span class="sr-only">Warning:</span>
                  Config map {{configMap.metadata.name}} has changed since you started editing it.
                  You'll need to copy any changes you've made and edit the config map again.
                </div>
                <div ng-if="resourceDeleted" class="alert alert-warning">
                  <span class="pficon pficon-warning-triangle-o" aria-hidden="true"></span>
                  <span class="sr-only">Warning:</span>
                  Config map {[configMap.metadata.name}} has been deleted since you started editing it.
                </div>
                <fieldset ng-disabled="disableInputs">
                  <edit-config-map-or-secret model="configMap" type="config map"></edit-config-map-or-secret>
                  <div class="button-group gutter-top gutter-bottom">
                    <button type="submit"
                        class="btn btn-primary btn-lg"
                        ng-click="updateConfigMap()"
                        ng-disabled="forms.editConfigMapForm.$invalid || forms.editConfigMapForm.$pristine || disableInputs || resourceChanged || resourceDeleted"
                        value="">Save</button>
                    <a class="btn btn-default btn-lg" href="" ng-click="cancel()" role="button">Cancel</a>
                  </div>
                </fieldset>
              </form>
            </div>
          </div>
        </div><!-- /col -->
      </div><!-- /row -->
    </div><!-- /container -->
  </div><!-- /middle-content -->
</div><!-- /middle -->
